<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('订单管理人管辖区域列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label style="width: 140px;">市县管理商姓名：</label>
                                <input type="text" name="rakerName"/>
                            </li>
                            <li>
                                <label style="width: 140px;">市县管理商电话：</label>
                                <input type="text" name="rakerPhone"/>
                            </li>
                            <!--<li>
                                <label>省级代码：</label>
                                <input type="text" name="rakerProvince"/>
                            </li>-->
                            <li>
                                <label>省份：</label>
                                <input type="text" name="rakerProvinceName"/>
                            </li>
                            <!--<li>
                                <label>城市代码：</label>
                                <input type="text" name="rakerCity"/>
                            </li>-->
                            <li>
                                <label>城市：</label>
                                <input type="text" name="rakerCityName"/>
                            </li>
                            <!--<li>
                                <label>县区代码：</label>
                                <input type="text" name="rakerDistrict"/>
                            </li>-->
                            <li>
                                <label>县区：</label>
                                <input type="text" name="rakerDistrictName"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <!--<div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="zsyh:rakeArea:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="zsyh:rakeArea:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="zsyh:rakeArea:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="zsyh:rakeArea:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>-->
            <div class="col-sm-12 select-table table-bordered">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('zsyh:rakeArea:edit')}]];
        var removeFlag = [[${@permission.hasPermi('zsyh:rakeArea:remove')}]];
        var prefix = ctx + "zsyh/rakeArea";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                showSearch: false,
                showRefresh: false,
                showToggle: false,
                showColumns: false,
                modalName: "订单管理人管辖区域",
                columns: [{
                    field : 'Number',
                    title : '序号',
                    align: 'center',
                    width: 20,
                    formatter : function(value, row, index) {
                        var pageSize = $('#bootstrap-table').bootstrapTable('getOptions').pageSize;//通过表的#id 可以得到每页多少条
                        var pageNumber = $('#bootstrap-table').bootstrapTable('getOptions').pageNumber;//通过表的#id 可以得到当前第几页
                        return pageSize * (pageNumber - 1) + index + 1;//返回每条的序号： 每页条数 * （当前页 - 1 ）+ 序号
                    }
                },
                {
                    field: 'id',
                    title: '主键',
                    visible: false
                },
                    {
                        field: 'rakerName',
                        align: 'center',
                        title: '市县管理商姓名'
                    },
                {
                    field: 'rakerPhone',
                    align: 'center',
                    title: '市县管理商电话'
                },
                /*{
                    field: 'rakerProvince',
                    title: '省级代码'
                },*/
                {
                    field: 'rakerProvinceName',
                    align: 'center',
                    title: '省级名称'
                },
                /*{
                    field: 'rakerCity',
                    title: '城市代码'
                },*/
                {
                    field: 'rakerCityName',
                    align: 'center',
                    title: '城市名称'
                },
               /* {
                    field: 'rakerDistrict',
                    title: '县区代码'
                },*/
                {
                    field: 'rakerDistrictName',
                    align: 'center',
                    title: '县区名称'
                }/*,
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }*/]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>